import request from '@/utils/request'
//登录
export function login(data) {
  return request({
    url: '/login',
    method: 'post',
    data
  })
}
//注销
export function logout() {
  return request({
    url: '/userLogout',
    method: 'get'
  })
}

//获取用户信息
export function getInfo(token) {
  return request({
    url: '/getUserInfo',
    method: 'get',
    params: { token }
  })
}
//获取所有用户
export function getAllUser() {
  return request({
    url: '/user/getAllUser',
    method: 'get',
  })
}
//更改密码
export function changePassword(data) {
  return request({
    url: '/user/changePassword',
    method: 'post',
    data
  })
}
